﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="easyui-layout" data-options="fit: true">
    <div data-options="region: 'center', border: false" style="padding:10px; overflow: hidden;">
        <div class="easyui-layout" data-options="fit: true">
            <div data-options="region:'north',border: false" class="hi40">
                <div class="pull-left form-inline ">
                </div>
                <div class="pull-right">
                    <form class="form-inline" id="formSearch">
                        <div class="input-group input-group-sm">
                            <label class="input-group-addon m5_l">内容：</label>
                            <input class="form-control" name="name" type="text" autocomplete="off">
                        </div>
                        <button type="button" class="btn btn-default btn-sm active" id="btn" name="search"><span class="glyphicon glyphicon-search"></span> 搜索</button>
                    </form>
                </div>
            </div>
            <div data-options="region:'center',split: false, border: false">
                <table id="logDG"></table>
            </div>
        </div>
    </div>
</div>
@section footerScript{
    <script type="text/javascript">

        var log = $("#logDG");

        $(function () {

            page.doSearch();

            $("button[name='search']").click(function () {
                page.doSearch();
            });
        });

        function Tip_success(word) {
            Topro.UI.Tip_success(word);
        }

        var page = {
            doSearch: function () {
                log.datagrid({
                fit: true,
                method: "get",
                url: "@Url.Action("LogQuery", "Auth")",
                queryParams: {},
                idField: 'id',
                pagination: true,
                singleSelect: true,
                rownumbers: true,
                showFooter: true,
                autoEditing:true,
                frozenColumns: null,
                columns: [
                    [
                        {
                            field: 'message',
                            title: '内容',
                            width: 550,
                            align: 'left',
                        },
                        {
                            field: 'createdDate',
                            title: '创建时间',
                            align: 'center',
                            width: 150,
                            formatter: function (value, row, index) {

                                var result = value.replace("T", " ");

                                return result;
                            }
                        }
                    ]
                ]
            })
            }
        }
    </script>
}


